package com.tamtamy.jtta.data.json;

import net.sf.json.JSONObject;

import com.tamtamy.jtta.data.ContentLink;
import com.tamtamy.jtta.utility.JSONUtility;

public class JSONContentLink extends ContentLink{		
	
	private static final long serialVersionUID = 7332687647513331335L;

	public JSONContentLink(JSONObject jsonObject) {
		this.id = JSONUtility.getLong(jsonObject,"id");
		this.title = JSONUtility.getString(jsonObject,"title");
		this.url =  JSONUtility.getString(jsonObject,"url");
		this.description = JSONUtility.getString(jsonObject,"description");
		this.permission = JSONUtility.getString(jsonObject,"permission");
		this.discussionPermission = JSONUtility.getString(jsonObject,"discussionPermission");
		this.size = JSONUtility.getString(jsonObject,"size");
		this.thumbnailPresent = JSONUtility.getBoolean(jsonObject,"thumbnailPresent");
		this.userID = JSONUtility.getString(jsonObject,"userID");
		this.favouriteCounter = JSONUtility.getString(jsonObject,"favouriteCounter");
		this.highlight = JSONUtility.getString(jsonObject,"highlight");
		this.numberOfComments = JSONUtility.getString(jsonObject,"numberOfComments");
		this.rateEnabled = JSONUtility.getString(jsonObject,"rateEnabled");
		this.tags = JSONUtility.getStringList(jsonObject,"tagList");
		this.descriptionPlainText = JSONUtility.getString(jsonObject,"descriptionPlainText");
		this.permalink = JSONUtility.getString(jsonObject,"permalink");
	}

}
